#include "mainwindow.h"

#include <QApplication>
#include <QGroupBox>
#include <QGridLayout>
#include <QTimer>

#include "glwidget.h"

MainWindow::MainWindow() {
	GLWidget *glwidget = new GLWidget();
	QTimer *timer = new QTimer(this);
	timer->setInterval(10);

	QGroupBox * groupBox = new QGroupBox(this);
	setCentralWidget(groupBox);

	QGridLayout *layout = new QGridLayout(groupBox);
	layout->addWidget(glwidget,1,0,8,1);
	groupBox->setLayout(layout);

	QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL()));
	timer->start();
}
